<template>
	<view>
		<view class="gird">
			<u-grid :col="4" :border="false">
				<u-grid-item v-if="opentop" style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/job/job')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu1.png"></u-image>
					<view class="grid-text">招聘信息</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/house/house')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu2.png"></u-image>
					<view class="grid-text">房产交易</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/car/car')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu3.png"></u-image>
					<view class="grid-text">车辆交易</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/commodity/commodity')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu4.png"></u-image>
					<view class="grid-text">物品交易</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/farming/farming')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu5.png"></u-image>
					<view class="grid-text">农林牧渔</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/transfer/transfer')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu6.png"></u-image>
					<view class="grid-text">生意转让</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/ask/ask')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu8.png"></u-image>
					<view class="grid-text">需求打听</view>
				</u-grid-item>
				<u-grid-item v-if="opentop" style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/carpool/carpool')"">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu3.png"></u-image>
					<view class="grid-text">顺风车</view>
				</u-grid-item>
				<u-grid-item style="background: rgba(0,0,0,0);" @click="navTo('/pagesUser/promote/promote')">
					<u-image width="80rpx" height="80rpx" src="@/static/images/menu5.png"></u-image>
					<view class="grid-text">本地推广</view>
				</u-grid-item>
			</u-grid>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				opentop:false,
			}
		},
		onLoad() {
			this.getCateFreeNum()
		},
		methods: {
			navTo(path) {
				this.$u.route(path);
			},
			getCateFreeNum() {
				this.$u.get('/addons/hicity/index/getCateFreeNum', {
					type: 'car'
				}).then(res => {
					this.opentop = res.opentop;
				})
			},
		}
	}
</script>
<style>
	page {
		background-color: white;
	}
</style>
<style lang="scss" scoped>
	.gird {
		background-color: white;
		border-radius: 20rpx;
	}

	.modelcont {
		padding: 30rpx;
		width: 500rpx;

		.cont {
			.cell {
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				height: 80rpx;
				font-size: 30rpx;
				color: #333333;
				background-color: #F1F1F1;
				border-radius: 10rpx;
				margin-bottom: 20rpx;
			}
		}

		.close {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			height: 50rpx;
		}
	}
</style>
